export const columns: BasicGridColumnProps[] = [
  {
    title: '员工号',
    field: 'employeeCode',
    minWidth: 120
  },
  {
    title: '姓名',
    field: 'firstName',
    minWidth: 120
  },
  {
    title: '性别',
    field: 'gender',
    minWidth: 70,
    cellRender: {
      name: 'ElTag',
      options: [
        { label: '男', value: '男', color: 'primary' },
        { label: '女', value: '女', color: 'danger' }
      ]
    }
  },
  {
    title: '工种',
    field: 'jobTitle',
    minWidth: 110
  },
  {
    title: '身份证',
    field: 'nationId',
    minWidth: 200
  },
  {
    title: '手机',
    field: 'phoneId',
    minWidth: 130
  },
  {
    title: '邮箱',
    field: 'email',
    minWidth: 160
  },
  {
    title: '生日',
    field: 'birthDay',
    minWidth: 130,
    formatter: ['formatDate']
  },
  {
    title: '民族',
    field: 'nation',
    minWidth: 120,
    visible: false
  },
  {
    title: '入职时间',
    field: 'hireDate',
    minWidth: 120,
    formatter: ['formatDate'],
    visible: false
  },
  {
    title: '状态',
    field: 'state',
    minWidth: 120,
    visible: false
  },
  {
    title: '离职时间',
    field: 'dimissionDate',
    formatter: ['formatDate'],
    minWidth: 120,
    visible: false
  },
  {
    title: '职称',
    field: 'title',
    minWidth: 120,
    visible: false
  },
  {
    title: '学历',
    field: 'education',
    minWidth: 120,
    visible: false
  },
  {
    title: '养老保险',
    field: 'oldAgeInsurance',
    minWidth: 120,
    visible: false
  },
  {
    title: '家庭地址',
    field: 'address',
    minWidth: 120,
    visible: false
  },
  {
    title: '操作',
    field: 'vxe-action',
    minWidth: 190,
    fixed: 'right',
    slots: { default: 'action' }
  }
]

export const searchFormItems: BasicFormItemProps[] = [
  {
    field: 'employeeCode',
    title: '员工号',
    span: 6,
    itemRender: { name: 'ElInput' }
  },
  {
    field: 'firstName',
    title: '员工姓名',
    span: 6,
    itemRender: { name: 'ElInput' }
  },
  {
    field: 'gongGongId',
    title: '工种',
    span: 6,
    resetValue: '0', // 重置时默认值
    itemRender: { name: 'ElSelect', options: [] }
  },
  {
    field: 'form-actions',
    span: 6,
    align: 'right',
    collapseNode: true,
    itemRender: {
      name: 'ActionButtons',
      children: [{ name: 'search' }, { name: 'reset' }]
    }
  },
  {
    field: 'gender',
    title: '性别',
    span: 6,
    folding: true,
    itemRender: {
      name: 'ElSelect',
      options: [
        { label: '全部', value: '0' },
        { label: '男', value: '1' },
        { label: '女', value: '2' }
      ]
    }
  },
  {
    field: 'nationId',
    title: '身份证号',
    span: 6,
    folding: true,
    itemRender: { name: 'ElInput' }
  },
  {
    field: 'state',
    title: '状态',
    span: 6,
    folding: true,
    resetValue: '0', // 重置时默认值
    itemRender: {
      name: 'ElSelect',
      options: [
        { label: '全部', value: '0' },
        { label: '在职', value: '1' },
        { label: '离职', value: '2' }
      ]
    }
  }
]
